Skip to content

Add type-filter chips and text search to Expose Targets picker#13

Merged
Malcolmnixon merged 1 commit into
mainfrom
feature/expose-target-type-filter
Jul 21, 2026
Merged

Add type-filter chips and text search to Expose Targets picker#13
Malcolmnixon merged 1 commit into
mainfrom
feature/expose-target-type-filter

Conversation

@Malcolmnixon

Copy link
Copy Markdown
Member

This pull request introduces a comprehensive filtering system for the "Expose Targets" picker in the View Builder Dialog, making it much easier for users to find and select elements in large workspaces. Users can now filter the picker by one or more type-label chips (e.g., "part", "package") with OR semantics, and further narrow results with a case-insensitive text search (AND semantics). The UI and ViewModel have been updated to support these features, and documentation and requirements have been expanded to describe and verify the new behaviors.

UI and User Experience Improvements

  • The "Expose Targets" tab now features a chip-based type filter row (with add/remove controls), a name search box, and a dynamically filtered picker list. The chip row defaults to a single "part" chip when available, with a "+" flyout for adding more types and "✕" buttons to remove chips. The ListBox displays only elements matching the active chips and search text. (src/DemaConsulting.SysML2Workbench/AppShellSubsystem/ViewBuilderDialogView.axaml, src/DemaConsulting.SysML2Workbench/AppShellSubsystem/ViewBuilderDialogView.axaml.cs, [1] [2] [3]

ViewModel and Filtering Logic

  • The ViewModel maintains the master list of candidates with their computed type labels, the set of active filter chips, the search text, and the filtered display list. It computes type labels per node kind, ensures deduplication and sorting, and updates all derived properties reactively when filters change. (src/DemaConsulting.SysML2Workbench/AppShellSubsystem/ViewBuilderDialogViewModel.cs, [1] [2] [3]

Documentation and Requirements

  • The design and user guide documentation now describe the new filtering system, including how type chips and text search work together, default behaviors, and how to interact with the UI. (docs/design/sysml2-workbench/app-shell-subsystem/view-builder-dialog.md, [1] [2]; docs/user_guide/getting_started.md, [3]
  • The requirements YAML and verification documentation have been updated with new acceptance criteria and test cases covering all aspects of the filter logic and UI. (docs/reqstream/sysml2-workbench/app-shell-subsystem/view-builder-dialog.yaml, [1]; docs/verification/sysml2-workbench/app-shell-subsystem/view-builder-dialog.md, [2]

The Custom View Builder's AvailableExposeTargets list is a single flat,
alphabetically-sorted list of every exposable qualified name in the
workspace. For large models this list grows to many pages with no way
to narrow it down, forcing users to scroll extensively to find the
element they want to expose.

This change computes a human-readable type label for each candidate
element (from SysmlDefinitionNode.DefinitionKeyword,
SysmlFeatureNode.FeatureKeyword, literal labels for package/dependency/
satisfy nodes, and a defensive fallback for any future node kind), and
adds a filter UI above the existing list: removable type-filter chips
(OR semantics across chips), a + button with a flyout to add new
type filters, and a text box for case-insensitive substring search
(ANDed with the type filter). The list defaults to filtering by part
since that's the most common expose target, while still allowing users
to widen or change the filter as needed.

The existing ListBox keeps its name and selection/double-click wiring
unchanged, now bound to the filtered DisplayedExposeTargets instead of
the raw AvailableExposeTargets, so existing add-target behavior is
unaffected.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Malcolmnixon
Malcolmnixon merged commit cc627b3 into main Jul 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant